#pragma once

#include "MeshDef.h"
#include "GLScene.h"

#include <Geom_BSplineSurface.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <TColgp_SequenceOfPnt.hxx>
#include <STEPControl_Reader.hxx>

#include <TColGeom_SequenceOfCurve.hxx>
#include <TColGeom_SequenceOfSurface.hxx>

// 形状头文件
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Wire.hxx>

#include <TopExp_Explorer.hxx>
#include <BRep_Tool.hxx>

class STPReader
{
public:
    STEPControl_Reader ReadSTP(const std::string& path);
    TColGeom_SequenceOfCurve ReadCurve(STEPControl_Reader& reader);
    TColGeom_SequenceOfSurface ReadSurface(STEPControl_Reader& reader);

    GLCurvePtr AsGLCurve(Handle(Geom_Curve) curve);
    GLCurvePtr AsGLCurve(Handle(Geom2d_Curve) curve);
    GLMeshPtr AsGLMesh(Handle(Geom_Surface) surface);
    GLMeshPtr AsParaGLMesh(Handle(Geom_Surface) surface);
};